Optimal. Leaf size=98 \[ \frac{8 x \sqrt{a \sin (c+d x)+a}}{d^2}+\frac{16 \cot \left (\frac{c}{2}+\frac{d x}{2}+\frac{\pi }{4}\right ) \sqrt{a \sin (c+d x)+a}}{d^3}-\frac{2 x^2 \cot \left (\frac{c}{2}+\frac{d x}{2}+\frac{\pi }{4}\right ) \sqrt{a \sin (c+d x)+a}}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10307, antiderivative size = 98, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {3319, 3296, 2638} \[ \frac{8 x \sqrt{a \sin (c+d x)+a}}{d^2}+\frac{16 \cot \left (\frac{c}{2}+\frac{d x}{2}+\frac{\pi }{4}\right ) \sqrt{a \sin (c+d x)+a}}{d^3}-\frac{2 x^2 \cot \left (\frac{c}{2}+\frac{d x}{2}+\frac{\pi }{4}\right ) \sqrt{a \sin (c+d x)+a}}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3319
Rule 3296
Rule 2638
Rubi steps
\begin{align*} \int x^2 \sqrt{a+a \sin (c+d x)} \, dx &=\left (\csc \left (\frac{c}{2}+\frac{\pi }{4}+\frac{d x}{2}\right ) \sqrt{a+a \sin (c+d x)}\right ) \int x^2 \sin \left (\frac{c}{2}+\frac{\pi }{4}+\frac{d x}{2}\right ) \, dx\\ &=-\frac{2 x^2 \cot \left (\frac{c}{2}+\frac{\pi }{4}+\frac{d x}{2}\right ) \sqrt{a+a \sin (c+d x)}}{d}+\frac{\left (4 \csc \left (\frac{c}{2}+\frac{\pi }{4}+\frac{d x}{2}\right ) \sqrt{a+a \sin (c+d x)}\right ) \int x \cos \left (\frac{c}{2}+\frac{\pi }{4}+\frac{d x}{2}\right ) \, dx}{d}\\ &=\frac{8 x \sqrt{a+a \sin (c+d x)}}{d^2}-\frac{2 x^2 \cot \left (\frac{c}{2}+\frac{\pi }{4}+\frac{d x}{2}\right ) \sqrt{a+a \sin (c+d x)}}{d}-\frac{\left (8 \csc \left (\frac{c}{2}+\frac{\pi }{4}+\frac{d x}{2}\right ) \sqrt{a+a \sin (c+d x)}\right ) \int \cos \left (\frac{c}{2}-\frac{\pi }{4}+\frac{d x}{2}\right ) \, dx}{d^2}\\ &=\frac{8 x \sqrt{a+a \sin (c+d x)}}{d^2}+\frac{16 \cot \left (\frac{c}{2}+\frac{\pi }{4}+\frac{d x}{2}\right ) \sqrt{a+a \sin (c+d x)}}{d^3}-\frac{2 x^2 \cot \left (\frac{c}{2}+\frac{\pi }{4}+\frac{d x}{2}\right ) \sqrt{a+a \sin (c+d x)}}{d}\\ \end{align*}
Mathematica [A] time = 0.209777, size = 92, normalized size = 0.94 \[ -\frac{2 \sqrt{a (\sin (c+d x)+1)} \left (\left (d^2 x^2-4 d x-8\right ) \cos \left (\frac{1}{2} (c+d x)\right )-\left (d^2 x^2+4 d x-8\right ) \sin \left (\frac{1}{2} (c+d x)\right )\right )}{d^3 \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.054, size = 119, normalized size = 1.2 \begin{align*}{\frac{-i\sqrt{2} \left ( -i{d}^{2}{x}^{2}+{d}^{2}{x}^{2}{{\rm e}^{i \left ( dx+c \right ) }}+4\,idx{{\rm e}^{i \left ( dx+c \right ) }}-4\,dx+8\,i-8\,{{\rm e}^{i \left ( dx+c \right ) }} \right ) \left ({{\rm e}^{i \left ( dx+c \right ) }}+i \right ) }{ \left ({{\rm e}^{2\,i \left ( dx+c \right ) }}-1+2\,i{{\rm e}^{i \left ( dx+c \right ) }} \right ){d}^{3}}\sqrt{-a \left ( -2-2\,\sin \left ( dx+c \right ) \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a \sin \left (d x + c\right ) + a} x^{2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: UnboundLocalError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int x^{2} \sqrt{a \left (\sin{\left (c + d x \right )} + 1\right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a \sin \left (d x + c\right ) + a} x^{2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]